<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>支付结果</title>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/0.4.3/weui.min.css">
    <style>
        .center {
            text-align: center;
        }

        .spinner {
            width: 100px;
            height: 100px;

            position: relative;
            margin: 100px auto;
        }

        .double-bounce1, .double-bounce2 {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background-color: #333;
            opacity: 0.6;
            position: absolute;
            top: 0;
            left: 0;

            -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
            animation: sk-bounce 2.0s infinite ease-in-out;
        }

        .double-bounce2 {
            -webkit-animation-delay: -1.0s;
            animation-delay: -1.0s;
        }

        @-webkit-keyframes sk-bounce {
            0%, 100% {
                -webkit-transform: scale(0.0)
            }
            50% {
                -webkit-transform: scale(1.0)
            }
        }

        @keyframes sk-bounce {
            0%, 100% {
                transform: scale(0.0);
                -webkit-transform: scale(0.0);
            }
            50% {
                transform: scale(1.0);
                -webkit-transform: scale(1.0);
            }
        }
    </style>
</head>
<body>
<div id="spin_indicator" class="spinner">
    <div class="double-bounce1"></div>
    <div class="double-bounce2"></div>
</div>
<div id="progress_text" class="center">
    <h2>正在确认支付结果中</h2>
</div>

<div id="success_msg" class="weui_msg">
    <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
    <div class="weui_text_area">
        <h2 class="weui_msg_title">支付成功</h2>
        <p class="weui_msg_desc">请到充值记录查看详情</p>
    </div>
</div>

<div id="failed_msg" class="weui_msg">
    <div class="weui_icon_area"><i class="weui_icon_warn weui_icon_msg"></i></div>
    <div class="weui_text_area">
        <h2 class="weui_msg_title">支付失败</h2>
        <p id="failed_reason" class="weui_msg_desc"></p>
    </div>
</div>

<script>

    $("#spin_indicator").hide();
    $("#progress_text").hide();
    if ({{ trade_status }} == 1) {
        $("#success_msg").show();
        $("#failed_msg").hide();
    } else {
        $("#success_msg").hide();
        $("#failed_msg").show();
    }
    setTimeout(function(){
        //window.location.href = "cp://open/home?index=0";
        window.location.href = "{{ return_url }}";
    }, 1000);

</script>
</body>
</html>
